package dfbz.demo;

import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        int i=1;
        while (true){
            System.out.println("请输入第"+i+"个人的成绩:");
            Scanner in=new Scanner(System.in);
            int in1=in.nextInt();
            String score1=(checkScore(in1));
            System.out.println(score1);
            i++;
            if (i==6){
                break;
            }
        }
    }
    public static String checkScore(int score){
       if (score<0||score>100){
           return "成绩无效";
       }else if(score>=90){
           return "优秀";
       }else if(score>=80){
           return "良好";
       }else if(score>=70){
           return "良";
       }else if(score>=60){
           return "及格";
       }else{
           return "不及格";
       }
    }
}
